﻿using System;

namespace MvvmEx.Controls.Messager
{
    public static class Messager
    {
        public static void ShowInfoMsg(string title, string content)
        {
            var msgBox = new MessageBox
            {
                Title = title,
                Content = content,
                OkBtnText = "确定"
            };
            msgBox.ShowDialog();
        }

        public static void ShowErrorMsg(string title, string content)
        {
            var msgBox = new MessageBox
            {
                Title = title,
                Content = content,
                OkBtnText = "关闭"
            };
            msgBox.ShowDialog();
        }

        public static void ShowConfirmMsg(string title, string content, Action<bool> handler)
        {
            var msgBox = new ConfirmMessageBox()
            {
                Title = title,
                Content = content,
                Handler = handler
            };

            msgBox.ShowDialog();
        }
    }
}